{include file='fcworker/fc_head'}
<style>
    .sub-div{
        width: 100%;
        text-align: center;
        margin: 0 auto;
    }
    .sub-btn{
        width: 184px;
        height: 35px;
        background-color: #5c99f7;
        border-radius: 50px;
        border: 0;
        margin-top: 20px;
        color: #fff;
        font-size: 15px;
        font-weight: 400;
    }
    .blacklist{
        width: 100%;
        height: 38%;
    }
</style>
<body style="background:#f8f8f8">
<div id="mescroll" class="mescroll">
    <div id="app">
        <div class="setTitle_h">
            <a href="javascript:history.back(-1)"></a>
            其它设置
        </div>
        <form id="myform3">
            <div class="setActive">
                <div class="actTit">
                    其它设置
                </div>
                <ul>

                    <li>
                        <p>链接黑名单</p>
                        <div class="choseBar2">
                            <textarea class="blacklist" name="blacklist" rows="6" placeholder="在黑名单的微信，将无法打开活动链接。比如我们的同行，只要微信昵称中包上述关键字，将会跳转到百度页面用“|”分格每一个关键字，例如：百度|腾讯|13512341234|幸福来敲门如想恢复可在某一个用户，可点粉丝->黑名单-开启，恢复。">{$config['blacklist']}</textarea>
                        </div>
                    </li>
                    <li>
                        <p>员工可以支付</p>
                        <div class="choseBar2 choseBar11">
                            <span  class="{php echo $radio['isworkerpay']==0?'on':'';}" data-value="0"  >不可支付</span>
                            <span class="{php echo $radio['isworkerpay']==1?'on':'';}" data-value="1">可支付</span>
                        </div>
                        <input type="hidden" name="isworkerpay" id="isworkerpay" value="{$radio['isworkerpay']}">
                    </li>
                    <li>
                        <p>商家核销</p>
                        <div class="choseBar2 choseBar12">
                            <span  class="{php echo $radio['ishexiao']==0?'on':'';}" data-value="0"  >关闭</span>
                            <span class="{php echo $radio['ishexiao']==1?'on':'';}" data-value="1">开启</span>
                        </div>
                        <input type="hidden" name="ishexiao" id="ishexiao" value="{$radio['ishexiao']}">
                    </li>
                    {if $config['is_multiple_merchants']}
                    <li>
                        <p>首页商家排序</p>
                        <div class="choseBar2 choseBar13">
                            <span  class="{php echo $radio['homeshowshop']==0?'on':'';}" data-value="0"  >谁转发谁在前+后台设置排名</span>
                            <span class="{php echo $radio['homeshowshop']==1?'on':'';}" data-value="1">谁转发谁在前+销售量排名</span>
                        </div>
                        <input type="hidden" name="homeshowshop" id="homeshowshop" value="{$radio['homeshowshop']}">
                    </li>
                    {/if}
                    {if $config['maxcountall']>1}
                    <li>
                        <p>团长排行榜</p>
                        <div class="choseBar2 choseBar14">
                            显示前
                            <input type="number" name="tuanrank" confirm-type="next" value="{$config['tuanrank']}" style="display: inline-block;width: 25%;text-align: center">
                            名
                        </div>
                    </li>
                    {/if}
                    <li>
                        <p>粉丝推荐成交榜</p>
                        <div class="choseBar2 choseBar15">
                            显示前
                            <input type="number" name="fansrank" confirm-type="next" value="{$config['fansrank']}" style="display: inline-block;width: 25%;text-align: center">
                            名
                        </div>
                    </li>
                </ul>
                <div class="actTit">
                    H5分享设置
                </div>
                <ul>

                    <li>
                        <p>未支付分享标题</p>
                        <div class="choseBar2 choseBar16">
                            <input type="text" name="sharetitle1"  placeholder="默认为活动标题" confirm-type="next" value="{$config['sharetitle1']}">
                        </div>
                    </li>
                    <li>
                        <p>已支付分享标题</p>
                        <div class="choseBar2 choseBar17">
                            <input type="text" name="sharetitle2" placeholder="默认为活动标题" confirm-type="next" value="{$config['sharetitle2']}">
                        </div>
                    </li>
                    <li>
                        <p>标题中显示客服</p>
                        <div class="choseBar2 choseBar18">
                            <span  class="{php echo $radio['isshowkefu']==0?'on':'';}" data-value="0"  >不显示</span>
                            <span class="{php echo $radio['isshowkefu']==1?'on':'';}" data-value="1">显示</span>
                        </div>
                        <input type="hidden" name="isshowkefu" id="isshowkefu" value="{$radio['isshowkefu']}">
                    </li>
                </ul>
                <div class="actTit">
                    界面样式
                </div>
                <ul>
                    <li>
                        <p>倒计时</p>
                        <div class="choseBar2 choseBar19">
                            <span  class="{php echo $radio['istime']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['istime']==10?'on':'';}" data-value="10">不显示</span>
                        </div>
                        <input type="hidden" name="istime" id="istime" value="{$radio['istime']}">
                    </li>
                    <li>
                        <p>报名数据+头像</p>
                        <div class="choseBar2 choseBar20">
                            <span  class="{php echo $radio['iswttouxiang']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['iswttouxiang']==10?'on':'';}" data-value="10">不显示</span>
                        </div>
                        <input type="hidden" name="iswttouxiang" id="iswttouxiang" value="{$radio['iswttouxiang']}">
                    </li>
                    <li>
                        <p>客户全名</p>
                        <div class="choseBar2 choseBar21">
                            <span  class="{php echo $radio['isshowname']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['isshowname']==1?'on':'';}" data-value="1">不显示</span>
                        </div>
                        <input type="hidden" name="isshowname" id="isshowname" value="{$radio['isshowname']}">
                    </li>
                    <li>
                        <p>交易凭证</p>
                        <div class="choseBar2 choseBar22">
                            <span  class="{php echo $radio['showpayresult']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['showpayresult']==1?'on':'';}" data-value="1">不显示</span>
                        </div>
                        <input type="hidden" name="showpayresult" id="showpayresult" value="{$radio['showpayresult']}">
                    </li>
                </ul>
                <div class="actTit">
                    弹幕设置
                </div>
                <ul>
                    <li>
                        <p>开启弹幕</p>
                        <div class="choseBar2 choseBar23">
                            <span  class="{php echo $radio['isdanmu']==0?'on':'';}" data-value="0"  >关闭</span>
                            <span class="{php echo $radio['isdanmu']==1?'on':'';}" data-value="1">新样式</span>
                            <span class="{php echo $radio['isdanmu']==2?'on':'';}" data-value="2">老样式</span>
                        </div>
                        <input type="hidden" name="isdanmu" id="isdanmu" value="{$radio['isdanmu']}">
                    </li>
                    <li>
                        <p>弹幕：点亮图标</p>
                        <div class="choseBar2 choseBar24">
                            <span  class="{php echo $radio['danmu01']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['danmu01']==1?'on':'';}" data-value="1">不显示</span>
                        </div>
                        <input type="hidden" name="danmu01" id="danmu01" value="{$radio['danmu01']}">
                    </li>
                    <li>
                        <p>弹幕：分销红包</p>
                        <div class="choseBar2 choseBar25">
                            <span  class="{php echo $radio['danmu02']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['danmu02']==1?'on':'';}" data-value="1">不显示</span>
                        </div>
                        <input type="hidden" name="danmu02" id="danmu02" value="{$radio['danmu02']}">
                    </li>
                    <li>
                        <p>弹幕：员工提成</p>
                        <div class="choseBar2 choseBar26">
                            <span  class="{php echo $radio['danmu03']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['danmu03']==1?'on':'';}" data-value="1">不显示</span>
                        </div>
                        <input type="hidden" name="danmu03" id="danmu03" value="{$radio['danmu03']}">
                    </li>
                    <li>
                        <p>弹幕：裂变红包</p>
                        <div class="choseBar2 choseBar27">
                            <span  class="{php echo $radio['danmu04']==0?'on':'';}" data-value="0"  >显示</span>
                            <span class="{php echo $radio['danmu04']==1?'on':'';}" data-value="1">不显示</span>
                        </div>
                        <input type="hidden" name="danmu04" id="danmu04" value="{$radio['danmu04']}">
                    </li>
                </ul>
            </div>
            <div class="sub-div">
                <button class="sub-btn" id="sub3" type="button">提交</button>
            </div>
        </form>
        {include file='fcworker/fc_foot_yixuan'}
        <div class="h110"></div>

    </div>
</div>
{include file='fcworker/fc_foot'}
</body>
<script>
    const mescroll = new MeScroll("mescroll", {
        down: {
            auto: false,
            callback: () => {
                mescroll.endSuccess();
                setTimeout(() => {
                    window.location.reload();
                },500)
            }
        },
        up: {
            use: false
        }
    })
    $('.choseBar11 span').click(function(){
        var isworkerpay = $(this).data("value");
        $("#isworkerpay").val(isworkerpay);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar12 span').click(function(){
        var ishexiao = $(this).data("value");
        $("#ishexiao").val(ishexiao);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar13 span').click(function(){
        var homeshowshop = $(this).data("value");
        $("#homeshowshop").val(homeshowshop);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar18 span').click(function(){
        var isshowkefu = $(this).data("value");
        $("#isshowkefu").val(isshowkefu);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar19 span').click(function(){
        var istime = $(this).data("value");
        $("#istime").val(istime);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar20 span').click(function(){
        var iswttouxiang = $(this).data("value");
        $("#iswttouxiang").val(iswttouxiang);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar21 span').click(function(){
        var isshowname = $(this).data("value");
        $("#isshowname").val(isshowname);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar22 span').click(function(){
        var showpayresult = $(this).data("value");
        console.log(showpayresult);
        $("#showpayresult").val(showpayresult);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar23 span').click(function(){
        var isdanmu = $(this).data("value");
        $("#isdanmu").val(isdanmu);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar24 span').click(function(){
        var danmu01 = $(this).data("value");
        $("#danmu01").val(danmu01);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar25 span').click(function(){
        var danmu02 = $(this).data("value");
        $("#danmu02").val(danmu02);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar26 span').click(function(){
        var danmu03 = $(this).data("value");
        $("#danmu03").val(danmu03);
        $(this).addClass('on').siblings().removeClass('on');
    })
    $('.choseBar27 span').click(function(){
        var danmu04 = $(this).data("value");
        $("#danmu04").val(danmu04);
        $(this).addClass('on').siblings().removeClass('on');
    })

    $('.moreChose span').click(function(){
        if($(this).hasClass('on')){
            $(this).removeClass('on')
        }else{
            $(this).addClass('on')
        }
    })
    $("#sub3").click(function () {
        var formData3 = $("#myform3").serializeArray();
        let datalist = {};
        $.each(formData3,function (index,item) {
            datalist[item.name] = item.value;
        });
        datalist['op'] = 'save';
        var postUrl="/{php echo createMobileUrl('X_setother',array('themeid'=>$themeid));}";
        $.ajax({
            url:postUrl,
            dataType:'json',
            method:'post',
            data: datalist,
            success:function (e) {
                let data = e.data;
                let error = e.error;
                let msg = e.msg;
                if (error){
                    layer.msg(msg);
                    return;
                }else{
                    layer.msg('保存成功');
                    self.location.href = postUrl;
                }
            },
            fail:function (err) {
            }
        });
    });
</script>
</html>